#pragma once
#include <string>
#include <vector>
#include "ResManager.h"

namespace ds {

class ContentPipeline {

enum TagTypes {
    TT_LAYER    = 1,
    TT_MATERIAL = 2,
    TT_SHADER   = 3
}; 	

struct Header {
	char id[11];
	int tags;
};

struct RawDataInfo {
	char name[32];
	int type;
	long size;
	char* data;
};

typedef std::vector<RawDataInfo> RawDataList;

public:
	ContentPipeline(): m_TagCounter(0) {}
	~ContentPipeline() {}
	void scanDirectory(const std::string& dirName);
	void processFiles();
	void savePakFile(const char* name);
	void loadPakFile(const char* name);
	void createResources(ResManager& resourceManager);
private:
	//
	bool readFile(const std::string& fileName,std::vector<std::string>& tokens);
	//
	std::vector<std::string> m_Files;
	std::string m_DirName;
	RawDataList m_RawData;
	int m_TagCounter;
};

}
